<%@taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<div class="navbar navbar-fixed-top">
	<div class="navbar-inner">
		<div class="container">
			<!-- Collapsable nav bar -->
			<a class="btn btn-navbar" data-toggle="collapse"
				data-target=".nav-collapse"> <span class="icon-bar"></span> <span
				class="icon-bar"></span> <span class="icon-bar"></span>
			</a>
			<!-- Your site name for the upper left corner of the site -->
			<a href="index.html" class="brand">Shopping-Mall</a>
			<!-- Start of the nav bar content -->
			<div class="nav-collapse">
				<!-- Other nav bar content -->
				
				<!-- The drop down menu -->
				<ul class="nav pull-right">
					<c:choose>
						<c:when test="${!empty userInfo}">
							<li class="dropdown"><a class="dropdown-toggle" href="#"
								data-toggle="dropdown">Hello ${userInfo.username} <strong
									class="caret"></strong></a>
								<div class="dropdown-menu"
									style="padding: 15px; padding-bottom: 0px;">
									<ul>
										<li><label class="string optional"> <a href="#">Change profile</a></label></li>
										<c:choose>
											<c:when test="${userInfo.memberposition.id == 1 }">
												<li><label class="string optional"> <a href="#">Manage Mall</a></label></li>
											</c:when>
											<c:when test="${userInfo.memberposition.id == 2 }">
												<c:forEach items="${userInfo.shops}" var="shop">
													<li><label class="string optional"> <a href="index-shop?shopid=${shop.id}&catid=-1">View your shop</a></label></li>
													<li><label class="string optional"> <a href="manage-shop.html?id=${shop.id}">Manage your shop</a></label></li>
												</c:forEach>
											</c:when>
											<c:when test="${userInfo.memberposition.id == 3 }">
												<li><label class="string optional"> <a href="#">Create your shop</a></label></li>
											</c:when>
										</c:choose>
									
									</ul>



								</div></li>
							<li class="divider-vertical"></li>
							<li><a href="sign-out.html">Sign Out</a></li>
						</c:when>
						<c:otherwise>
							<li><a href="register.html">Sign Up</a></li>
							<li class="divider-vertical"></li>
							<li class="dropdown"><a class="dropdown-toggle" href="#"
								data-toggle="dropdown">Sign In <strong class="caret"></strong></a>
								<div class="dropdown-menu"
									style="padding: 15px; padding-bottom: 0px;">
									<form action="login.html" method="post" accept-charset="UTF-8">
										<input id="user_username" style="margin-bottom: 15px;"
											type="text" name="username" size="30" placeholder="Username" />
										<input id="user_password" style="margin-bottom: 15px;"
											type="password" name="password" size="30"
											placeholder="PassWord" /> <input id="user_remember_me"
											style="float: left; margin-right: 10px;" type="checkbox"
											name="user[remember_me]" value="1" /> <label
											class="string optional" for="user_remember_me">
											Remember me</label> <input class="btn btn-primary"
											style="clear: left; width: 100%; height: 32px; font-size: 13px;"
											type="submit" name="commit" value="Sign In" />
									</form>
								</div></li>
						</c:otherwise>
					</c:choose>
				</ul>
			</div>
		</div>
	</div>
</div>